﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using DomainDriver.DomainModeling.GenericUnitTesting;
using AutomotivePricingModel.Companies;

namespace AutomotivePricingModel.UnitTests.DomainObjects
{
    [TestFixture]
    public class CompanyTests : DomainObjectTestFixture<Guid, Company>
    {
        protected override Company CreateUniqueDomainObject()
        {
            return new Company();
        }

        protected override ICollection<DomainObjectModifier<Guid, Company>> GetDomainObjectModifiers()
        {
            List<DomainObjectModifier<Guid, Company>> modifiers = new List<DomainObjectModifier<Guid, Company>>();
            modifiers.Add((Company domainObject) => domainObject.CeoName += m_StringUpdateValue);
            modifiers.Add((Company domainObject) => domainObject.CeoName = null);
            modifiers.Add((Company domainObject) => domainObject.CompanyFoundingDate = m_DateTimeUpdateValue);
            modifiers.Add((Company domainObject) => domainObject.CompanyFoundingDate = null);
            modifiers.Add((Company domainObject) => domainObject.CompanyName += m_StringUpdateValue);
            modifiers.Add((Company domainObject) => domainObject.CompanyName = null);
            modifiers.Add((Company domainObject) => domainObject.CountryOfHeadquarters = m_GuidUpdateValue);
            modifiers.Add((Company domainObject) => domainObject.CountryOfHeadquarters = null);
            modifiers.Add((Company domainObject) => domainObject.EarningsHistory.SetValue(m_IntUpdateValue, m_DoubleUpdateValue));
            modifiers.Add((Company domainObject) => domainObject.EarningsHistory.SetValue(m_IntUpdateValue2, m_DoubleUpdateValue2));
            modifiers.Add((Company domainObject) => domainObject.EarningsHistory.RemoveValue(m_IntUpdateValue));
            modifiers.Add((Company domainObject) => domainObject.EarningsHistory.SetValue(m_IntUpdateValue3, m_DoubleUpdateValue3));
            modifiers.Add((Company domainObject) => domainObject.EarningsHistory.RemoveValue(m_IntUpdateValue3));
            modifiers.Add((Company domainObject) => domainObject.EarningsHistory.RemoveValue(m_IntUpdateValue2));
            modifiers.Add((Company domainObject) => domainObject.FounderName += m_StringUpdateValue);
            modifiers.Add((Company domainObject) => domainObject.FounderName = null);
            return modifiers;
        }

        [Test]
        public override void VerifyDomainObjectFunctionality()
        {
            base.VerifyDomainObjectFunctionality();
        }
    }
}